package create.factoryPattern;



/**
 * Created by hmily on 2017/9/6.
 */
public class simpleFactory {

    public productInterface getProduct(String product){
        switch (product){
            case "beef" :
                return new beef();
            case "rice" :
                return new rice();

        }
        return null;
    }
}
